﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="reappedit.aspx.cs" Inherits="LabMS.Web.Equipment.common.reappedit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>耗材领用修改</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <link href="../../css/jquery.wysiwyg.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->
</head>
<body onload="LabChange()" class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        <a href="recipientsapplist.aspx">借出申请列表</a></label>&gt;借出申请修改
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <asp:Button ID="Submit" CssClass="button" runat="server" Text="申请" OnClick="Submit_Click" />
                <asp:Button ID="btnSave" CssClass="button" runat="server" Text="保存" OnClick="Submit_Click" />
                <input id="Button1" class="button" type="button" value="返回" />
            </p>
            <table border="0" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用类型:</label></td>
                    <td>
                        <asp:DropDownList ID="ddlEType" runat="server">
                            <asp:ListItem Text="消耗品" Value="xiaohaopin"></asp:ListItem>
                            <asp:ListItem Text="低值品" Value="lowvalue"></asp:ListItem>
                            <asp:ListItem Text="仪器" Value="yiqi"></asp:ListItem>
                            <asp:ListItem Text="贵重仪器" Value="guizhongyiqi"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用仓库:</label></td>
                    <td>
                        <asp:DropDownList ID="ddlLabs" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            编 &nbsp; &nbsp; 号:</label></td>
                    <td>
                        <asp:TextBox ID="tbCNub" runat="server"></asp:TextBox><font style="color: Red">*</font>
                        <input id="tbUrl" runat="server" style="display: none" type="text" />
                        <input id="tbUintPrice" runat="server" style="display: none" type="text" />
                        <input onclick="OpenEditWin2(document.getElementById('tbUrl').value,500,400,'tbCNub', 'lbCName','lbTypeNub','lbAllNub','tbUintPrice')"
                            type="button" value="..." class="button" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            名 &nbsp; &nbsp; 称:</label></td>
                    <td>
                        <asp:TextBox ID="lbCName" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            分 类 号:</label></td>
                    <td>
                        <asp:TextBox ID="lbTypeNub" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            库存数量:</label></td>
                    <td>
                        <asp:TextBox ID="lbAllNub" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            使用方向:</label></td>
                    <td>
                        <asp:DropDownList ID="ddlArrow" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用数量:</label></td>
                    <td>
                        <asp:TextBox ID="tbUserNub" runat="server"></asp:TextBox><font style="color: Red">*</font></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实 验 室:</label></td>
                    <td>
                        <asp:TextBox ID="tbLabName" runat="server"></asp:TextBox><span style="color: Red">*</span>
                        <input id="tbLabCode" runat="server" style="display: none" type="text" />
                        <input onclick="OpenEditWin('../../CommonPage/LabList.aspx',500,400,'tbLabCode', 'tbLabName')"
                            type="button" value="..." class="button" /></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用时间:</label></td>
                    <td>
                        <asp:TextBox ID="tbRecipientsDate" runat="server"></asp:TextBox><span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            备 &nbsp; &nbsp;注:</label></td>
                    <td>
                        <asp:TextBox ID="Comment" Columns="80" Rows="20" TextMode="MultiLine" ToolTip="交流内容 "
                            runat="server"></asp:TextBox></td>
                </tr>
            </table>
            <asp:Label ID="lbErr" runat="server" ForeColor="Red" Text="Err" Visible="False"></asp:Label>
            <asp:TextBox ID="tbEType" runat="server"></asp:TextBox>
            <asp:TextBox ID="tbID" runat="server"></asp:TextBox>
        </div>

        <script src="../../js/calendar5.js" type="text/javascript"></script>

        <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

        <script type="text/javascript" src="../../js/jQuery/jquery.validate.js"></script>

        <script type="text/javascript" src="../../js/jQuery/jquery.wysiwyg.js"></script>

        <script type="text/javascript">    
    $(function(){
           
            $("#Comment").wysiwyg();           
          
            $("#form1").validate({
                rules: {
                    tbCNub: {
                        required: true
                    },
                    tbLabName: {
                        required: true
                    },
                    tbRecipientsDate: {
                        required: true
                    } 
                },
                messages: {
                    tbCNub: {
                        required: "编号不能为空"
                    },
                    tbLabName: {
                        required: "领用实验室不能为空"
                    },
                    tbRecipientsDate: {
                        required: "领用时间不能为空"
                    } 
                }
            });        
        });     
         var c = new Calendar("c");
         document.write(c);
       
     $("#Button1").click( function () { if(document.getElementById('tbEType').value==''){window.location.href='recipientappperview.aspx?ID='+document.getElementById('tbID').value;}if(document.getElementById('tbEType').value!=''){window.location.href='recipientappperview.aspx?Type='+ document.getElementById('tbEType').value+'\&ID='+document.getElementById('tbID').value;}; });  
       
      function OpenEditWin(frmWin,width,height,obj1, obj2) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            { 
                document.getElementById(obj1).value = ret[0];
                document.getElementById(obj2).value = ret[1];
            }  
      }
     
     //1:编号，2:名称 3:分类号 4:库存数量 5:单价
     function OpenEditWin2(frmWin,width,height,obj1, obj2,obj3,obj4,obj5) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            { 
                document.getElementById(obj1).value = ret[0];
                document.getElementById(obj2).value = ret[1];
                document.getElementById(obj3).value = ret[2];
                document.getElementById(obj4).value = ret[3];
                document.getElementById(obj5).value = ret[4];
            }  
      } 
     
     function LabChange()
     {
        Url = "../../CommonPage/consumselectlist.aspx";
        Url = Url + "?type="+ document.getElementById("ddlEType").value +"&location=" + document.getElementById("ddlLabs").value;
        document.getElementById("tbUrl").value = Url;
     } 
        </script>

    </form>
</body>
</html>
